#ifndef __SERVO_H
#define __SERVO_H
#include "stm32f1xx.h"
#include "tim.h"


#define HEAD_FIX_ANGLE  				100
#define LAUNCH_FIX_ANGLE  				100
#define HEAD_SERVO_MOVE_STEP 			5
#define LAUNCH_SERVO_MOVE_STEP 			50

extern uint32_t global_head_servo_angle;
extern uint32_t global_launch_servo_angle;

void head_servo_cmd(int pos);
void launch_servo_cmd(int pos);

void head_servo_plus(void);
void head_servo_minus(void);
void launch_servo_plus(void);
void launch_servo_minus(void);
void sub_launch1_servo_cmd(int dir,int speed);
void sub_launch2_servo_cmd(int dir,int speed);

#define CLOCKWISE						1
#define COUNTERCLOCKWISE				0

#endif
